home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / editor / frexxed / fpl / cindent.fpl.readme < prev    next >
Text File  |  1996-08-21  |  3KB  |  84 lines

  1. ############################################
  2. File:        CIndent.FPL
  3. Author:        Linus Nielsen
  4. Email:        emwnie@emw.ericsson.se
  5. Short:        Performs an automatic C-language indentation
  6. Version:    1.7
  7. Date:        21.8.96
  8. Local settings:
  9.  "c_indent_mode", BOOLEAN    TRUE when the mode is active
  10.  "c_indent_level", INTEGER    The normal indent level.
  11.  "c_case_level", INTEGER    Indent level for 'case' & 'default' lines.
  12.  "c_brace_offset", INTEGER    Offset for the lines containing a brace.
  13.  "c_cont_offset", INTEGER    Line continuation level.
  14.  "c_usetabs", BOOLEAN        TRUE for optimal filling with TAB.
  15.  
  16. Global settings:
  17.  "c_intelligence", CYCLE    The search depth for the indentation analysis.
  18.                  Can be "Stupid", "Smart" or "Ninja".
  19.  "c_indentkey", STRING        The key to use for forced indentation.
  20.  "c_delay", INTEGER        The number of ticks to wait when matching
  21.                  parentheses.
  22.  "c_face_mode" BOOLEAN          TRUE to auto-enable the C-face
  23.  
  24. Keysequence:
  25. Type:        Minor Mode, hook, key
  26. Prereq:
  27. ############################################
  28.  
  29. FUNCTION
  30.  
  31.   Do edit the face colours to your personal preferences! See the FAQ.
  32.  
  33.   This script handles automatic indentation of C code. The following is handled:
  34.   
  35.   - When you press 'Return', it analyses the previous lines to determine the
  36.     indentation level and automatically indents the next line.
  37.     
  38.   - When you press '}', it moves it to the right level.
  39.   
  40.   - When you press ':' right after 'case' or 'default', it moves the line to the
  41.     right level.
  42.     
  43.   - When you press ')' or ']' it shows the matching '(' or '['.
  44.   
  45.   - When you type '*/' (the end of a comment), it shows you the matching '/*'.
  46.   
  47.   - When you type '#' as the only non whitespace character on a line, it moves
  48.     it to the beginning of the line (for #define and #ifdef).
  49.  
  50.   - If for some reason the automatic indentation fails, press the 'force indent'
  51.     key to reanalyse. Useful if an indentation level has been removed, or when
  52.     cutting and pasting from different levels.
  53.     
  54.     
  55.     How to enable CIndent.FPL
  56.     -------------------------
  57.     
  58.     Use FMC.FPL, and make your Major Mode set 'c_indent_mode' to 1 when a 
  59.     'c', 'fpl' or 'h' file is loaded. See FMC.FPL.README for information.
  60.  
  61.     
  62. HISTORY
  63.   1.1    Fixed bug that caused TAB characters to disturb the indentation
  64.     check.
  65.   1.2    Fixed an even more stupid bug which caused the indentation to
  66.     fail in the first column.
  67.   1.3    Replaced the enter key to return.
  68.   
  69.   1.4    Completely rewritten, ripping some ideas from Jesper Skov's
  70.       CIndentMode.FPL script. Now it is much more intelligent.
  71.  
  72.   1.5   Daniel Stenberg. Added the first attempts to incorporate proper
  73.         "face" styling to C programs. Also uses the new way of adding
  74.         program preference menus to the Menu.FPL made menu, using the
  75.         proper info variables it has made for our use!
  76.  
  77.   1.6    More easier to invoke, execute CMode.FPL
  78.     Added the apostrophe-style for 'a' stuff. '"' previously did look
  79.     messy. (As reported by RexOrient)
  80.   1.7    Jesper Skov changed a pattern and the prefs part.
  81.  
  82. BUGS
  83.     Sometimes it doesn't indent the way you'd want it to
  84.